package e2q.oa.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
@Entity
@Table(name = "SYSTEMUSERROLERELATION")
public class E2qOaUserRolereLation implements Serializable {
	// Fields

	private Long surrid;
	private E2qOaUser systemuserinfo;
	private E2qOaUserRoleInfo systemroleinfo;

	// Constructors

	/** default constructor */
	public E2qOaUserRolereLation() {
	}

	/** full constructor */
	public E2qOaUserRolereLation(Long surrid,
			E2qOaUser systemuserinfo, E2qOaUserRoleInfo systemroleinfo) {
		this.surrid = surrid;
		this.systemuserinfo = systemuserinfo;
		this.systemroleinfo = systemroleinfo;
	}

	// Property accessors
	@Id
	@GeneratedValue(generator = "pk")
	@Column(name = "surrid")
	@GenericGenerator(name = "pk", strategy = "e2q.web.orm.IdGenerator")
	public Long getSurrid() {
		return this.surrid;
	}

	public void setSurrid(Long surrid) {
		this.surrid = surrid;
	}

	@ManyToOne
	@JoinColumn(name = "surr_suinID")
	public E2qOaUser getSystemuserinfo() {
		return systemuserinfo;
	}

	public void setSystemuserinfo(E2qOaUser systemuserinfo) {
		this.systemuserinfo = systemuserinfo;
	}
	@ManyToOne
	@JoinColumn(name = "surr_srinID")
	public E2qOaUserRoleInfo getSystemroleinfo() {
		return systemroleinfo;
	}

	public void setSystemroleinfo(E2qOaUserRoleInfo systemroleinfo) {
		this.systemroleinfo = systemroleinfo;
	}
} 
